/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 邓大帅
 * Date: 2022-12-17
 * Time: 15:57
 */
public class FindSingleNumbers {
    public static int findSingleNumbers(int[] array) {
        int[] array1 = new int[20];
        for (int i = 0; i < array.length; i++) {
            array1[array[i]]++;
        }
        for (int i = 0; i < array1.length; i++) {
            if (array1[i] == 1) {
                return i;
            }
        }
        return 0;
    }
    public static void main(String[] args) {
        int[] array = new int[]{1,1,2,2,3,3,4,};
        System.out.println(findSingleNumbers(array));
    }
}
